import os
class ratrix:
    
    
    def __init__(self,**kwargs):
        self.serverDataPath = '';
        self.dbPath = '';
        self.subjects = list();
        self.boxes = list();
        self.assignments = list();
        self.standAlonePath = ();
        self.creationDate = '';
        print('initiating a ratrix object');
        for key in kwargs:
            if hasattr(self,key):
                setattr(self,key,kwargs[key])
            else:
                raise Exception('unRecognized attribute "%s"' %(key))
        
        # perform error correction here
        
        # serverDataPath
        if os.path.exists(self.serverDataPath):
            pass
        else:
            raise Exception('unknown serverDataPath');
        
        
        # dbPath
        if os.path.exists(self.dbPath):
            pass
        else:
            raise Exception('unknown dbPath');
        
        
        # subjects
        if isinstance(self.subjects,list):
            pass
        else:
            raise Exception('subject must be a list');
        
    

t = ratrix(serverDataPath="c:\\",dbPath = 'C:\\',subjects=['balaji','405']);
print(t.serverDataPath)